package com.ajax.browser;

public interface ClientletRequest {
	/**
	 * Gets the request method.
	 * @return GET, POST, etc.
	 */
	public String getMethod();
	
	/**
	 * Gets the request URL.
	 */
	public java.net.URL getRequestURL();
	
	/**
	 * Gets information about the user agent making the request.
	 */
	public UserAgent getUserAgent();
	
	/**
	 * Gets the referring URL. It should be <code>null</code>
	 * if none or unknown.
	 */
	public String getReferrer();
	
	/**
	 * Gets information about the request parameters.
	 */
	public ParameterInfo getParameterInfo();
	
	/**
	 * Gets additional headers used in the request. 
	 */
	public Header[] getExtraHeaders();
	
	/**
	 * Convenience method. Determines if the request method is GET.
	 */
	public boolean isGetRequest();
	
	/**
	 * Convenience method. Determines if the request method is POST.
	 */
	public boolean isPostRequest();
	
	/**
	 * Determines if the request was made in order to open a new
	 * browser window.
	 */
//	public boolean isNewWindowRequest();
	
	/**
	 * Provides alternative POST data in case no <code>ParameterInfo</code>
	 * is provied.
	 */
	public String getAltPostData();
	
	/**
	 * Gets the type of request.
	 */
//	public RequestType getRequestType();
}
